1. Field of the Invention
This invention is related to the field of branch prediction in processors, and more particularly to indirect branch prediction.
2. Description of the Related Art
As the number of transistors included on an integrated circuit “chip” continues to increase, power management in the integrated circuits continues to increase in importance. Power management can be critical to integrated circuits that are included in mobile devices such as personal digital assistants (PDAs), cell phones, smart phones, laptop computers, net top computers, etc. These mobile devices often rely on battery power, and reducing power consumption in the integrated circuits can increase the life of the battery. Additionally, reducing power consumption can reduce the heat generated by the integrated circuit, which can reduce cooling requirements in the device that includes the integrated circuit (whether or not it is relying on battery power).
In an integrated circuit that includes one or more processors, power management is balanced with the need for high processor performance. To improve performance, the processor often implements deep pipelines for instruction execution, and often implements out-of-order speculative execution as well. With typical software including complicated control flows with numerous branch instructions, branch prediction is typically employed to speculate past the branch instructions in the speculative instruction stream to uncover additional instructions for potential out-of-order execution.
While branch prediction can increase performance, branch mispredictions incur costs in both performance and power. Generally, the instructions that are subsequent to the branch in the speculative program order (sometimes referred to as younger instructions) must be flushed, any speculative state corresponding to the subsequent instructions must be discarded, and any speculative state corresponding to the most recent instructions that were not flushed must be restored or recreated. The power expended to recover from the misprediction, along with the power expended to incorrectly execute the flushed instructions, represents wasted power.